﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcPresenter.Models.Presentation>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Demotter on MvcPresenter
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>一覧</h2>

	<% = Html.ValidationSummary() %>
    
    <ul>
    <% foreach (var item in Model) { %>
    
		<li>
			<%= Html.RouteLink(item.Name, "Viewer", new { id = item.Name })%>
			&nbsp;-&nbsp;
			<% using (Html.BeginForm("Delete", "Home", new { id = item.Name }, FormMethod.Post, new { style = "display:inline;" })) { %>
				<%= Html.HttpMethodOverride(HttpVerbs.Delete) %>
				<input type="submit" value="削除"<% = item.Name == "techdays2010" ? " disabled=\"disabled\"" : ""%> />
			<% } %>
		</li>
		
    <% } %>

    </ul>

    <h2>アップロード</h2>
    <p>
	<% using (Html.BeginForm("Index","Home",new{}, FormMethod.Post,new { enctype = "multipart/form-data" })) { %>
		<input type="file" name="presentation" />
		<input type="submit" value="送信" />
    <% } %>
    </p>

</asp:Content>

